<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>AWTK-CPP: TStyle类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">AWTK-CPP
   </div>
   <div id="projectbrief">AWTK CPP API</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="#pub-static-methods">静态 Public 成员函数</a> &#124;
<a href="#pub-attribs">Public 属性</a> &#124;
<a href="class_t_style-members.html">所有成员列表</a>  </div>
  <div class="headertitle">
<div class="title">TStyle类 参考</div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;<a class="el" href="awtk__cpp_8hpp_source.html">awtk_cpp.hpp</a>&gt;</code></p>
<div class="dynheader">
类 TStyle 继承关系图:</div>
<div class="dyncontent">
 <div class="center">
  <img src="class_t_style.png" usemap="#TStyle_map" alt=""/>
  <map id="TStyle_map" name="TStyle_map">
<area href="class_t_style_mutable.html" alt="TStyleMutable" shape="rect" coords="0,56,92,80"/>
  </map>
</div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:a65e92e6d34e0c4829b96eadb04115a75"><td class="memItemLeft" align="right" valign="top"><a id="a65e92e6d34e0c4829b96eadb04115a75"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>TStyle</b> (style_t *nativeObj)</td></tr>
<tr class="separator:a65e92e6d34e0c4829b96eadb04115a75"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa825ac97170508d5d24143482e98ccda"><td class="memItemLeft" align="right" valign="top"><a id="aa825ac97170508d5d24143482e98ccda"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>TStyle</b> (const style_t *nativeObj)</td></tr>
<tr class="separator:aa825ac97170508d5d24143482e98ccda"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3a094c4d8760823f71772a9778e033a5"><td class="memItemLeft" align="right" valign="top">ret_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_style.html#a3a094c4d8760823f71772a9778e033a5">NotifyWidgetStateChanged</a> (TWidget &amp;widget)</td></tr>
<tr class="separator:a3a094c4d8760823f71772a9778e033a5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab338f7bae3dfe4da88d4f64b5efedf52"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_style.html#ab338f7bae3dfe4da88d4f64b5efedf52">IsValid</a> ()</td></tr>
<tr class="separator:ab338f7bae3dfe4da88d4f64b5efedf52"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afa25880edce1ce52b7be659d6d9842a8"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_style.html#afa25880edce1ce52b7be659d6d9842a8">GetInt</a> (const char *name, int32_t defval)</td></tr>
<tr class="separator:afa25880edce1ce52b7be659d6d9842a8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acc313e64294bc3204fe56994e1ed6d3e"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_style.html#acc313e64294bc3204fe56994e1ed6d3e">GetStr</a> (const char *name, const char *defval)</td></tr>
<tr class="separator:acc313e64294bc3204fe56994e1ed6d3e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab0fd6aee96501b4ffefcdb47f877b964"><td class="memItemLeft" align="right" valign="top">ret_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_style.html#ab0fd6aee96501b4ffefcdb47f877b964">Set</a> (const char *state, const char *name, <a class="el" href="class_t_value.html">TValue</a> &amp;value)</td></tr>
<tr class="separator:ab0fd6aee96501b4ffefcdb47f877b964"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0fc783502f0ad0699d4377c3dfb20aed"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_style.html#a0fc783502f0ad0699d4377c3dfb20aed">IsMutable</a> ()</td></tr>
<tr class="separator:a0fc783502f0ad0699d4377c3dfb20aed"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
静态 Public 成员函数</h2></td></tr>
<tr class="memitem:a16ecd7e302a4de1eb535b8b8365b241d"><td class="memItemLeft" align="right" valign="top"><a id="a16ecd7e302a4de1eb535b8b8365b241d"></a>
static <a class="el" href="class_t_style.html">TStyle</a>&#160;</td><td class="memItemRight" valign="bottom"><b>Cast</b> (style_t *nativeObj)</td></tr>
<tr class="separator:a16ecd7e302a4de1eb535b8b8365b241d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0f61e8bf131680f0c91a97780d49e669"><td class="memItemLeft" align="right" valign="top"><a id="a0f61e8bf131680f0c91a97780d49e669"></a>
static <a class="el" href="class_t_style.html">TStyle</a>&#160;</td><td class="memItemRight" valign="bottom"><b>Cast</b> (const style_t *nativeObj)</td></tr>
<tr class="separator:a0f61e8bf131680f0c91a97780d49e669"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public 属性</h2></td></tr>
<tr class="memitem:a09c6f48243b069bb90d8509fbfd64a22"><td class="memItemLeft" align="right" valign="top"><a id="a09c6f48243b069bb90d8509fbfd64a22"></a>
style_t *&#160;</td><td class="memItemRight" valign="bottom"><b>nativeObj</b></td></tr>
<tr class="separator:a09c6f48243b069bb90d8509fbfd64a22"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p>控件风格。</p>
<p>widget从style对象中，获取诸如字体、颜色和图片相关的参数，根据这些参数来绘制界面。</p>
<p>属性名称的请参考style\_id </p>
</div><h2 class="groupheader">成员函数说明</h2>
<a id="afa25880edce1ce52b7be659d6d9842a8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afa25880edce1ce52b7be659d6d9842a8">&#9670;&nbsp;</a></span>GetInt()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t TStyle::GetInt </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>defval</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>获取指定name的整数格式的值。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">name</td><td>属性名。 </td></tr>
    <tr><td class="paramname">defval</td><td>缺省值。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回整数格式的值。 </dd></dl>

</div>
</div>
<a id="acc313e64294bc3204fe56994e1ed6d3e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acc313e64294bc3204fe56994e1ed6d3e">&#9670;&nbsp;</a></span>GetStr()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char * TStyle::GetStr </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>defval</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>获取指定name的字符串格式的值。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">name</td><td>属性名。 </td></tr>
    <tr><td class="paramname">defval</td><td>缺省值。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回字符串格式的值。 </dd></dl>

</div>
</div>
<a id="a0fc783502f0ad0699d4377c3dfb20aed"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0fc783502f0ad0699d4377c3dfb20aed">&#9670;&nbsp;</a></span>IsMutable()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool TStyle::IsMutable </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>检查style是否是mutable的。</p>
<dl class="section return"><dt>返回</dt><dd>返回TRUE表示是，否则表示不是。 </dd></dl>

</div>
</div>
<a id="ab338f7bae3dfe4da88d4f64b5efedf52"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab338f7bae3dfe4da88d4f64b5efedf52">&#9670;&nbsp;</a></span>IsValid()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool TStyle::IsValid </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>检查style对象是否有效</p>
<dl class="section return"><dt>返回</dt><dd>返回是否有效。 </dd></dl>

</div>
</div>
<a id="a3a094c4d8760823f71772a9778e033a5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3a094c4d8760823f71772a9778e033a5">&#9670;&nbsp;</a></span>NotifyWidgetStateChanged()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ret_t TStyle::NotifyWidgetStateChanged </td>
          <td>(</td>
          <td class="paramtype">TWidget &amp;&#160;</td>
          <td class="paramname"><em>widget</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>widget状态改变时，通知style更新数据。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">widget</td><td>控件对象。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="ab0fd6aee96501b4ffefcdb47f877b964"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab0fd6aee96501b4ffefcdb47f877b964">&#9670;&nbsp;</a></span>Set()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ret_t TStyle::Set </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>state</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_t_value.html">TValue</a> &amp;&#160;</td>
          <td class="paramname"><em>value</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>设置指定状态的指定属性的值(仅仅对mutable的style有效)。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">state</td><td>状态。 </td></tr>
    <tr><td class="paramname">name</td><td>属性名。 </td></tr>
    <tr><td class="paramname">value</td><td>值。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>output/<a class="el" href="awtk__cpp_8hpp_source.html">awtk_cpp.hpp</a></li>
<li>output/awtk_cpp.cpp</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者 &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.17
</small></address>
</body>
</html>
